Get Customer Products
This API is used to retrieve from the catalog a list of all customer products which were created by itself for its sub-customers.
|
HTTP URL |
|
|---|---|
| GET | /api/v2/customer/{id}/product/created-products |
Note: For paging support, please refer to the paging section.
Eligibility
The Requestor is eligible to request information on products which were created by itself and which are available for attachment to his sub-customers.
API Request
Request Structure
N/A
API Response
Response Structure
|
Parameter |
Type |
M/O/CM |
Description |
|---|---|---|---|
|
errorCode |
String |
O |
Failure code. See list below, under ‘Error Codes’ section. |
|
errorMessage |
String |
O |
Failure detailed description. See list below, under ‘Error Codes’ section. |
|
content |
Object |
O |
Array of main response body object displayed when an API call was successful. For a failure, it will be empty. |
|
pageable |
Object |
O |
Paging information object displayed when an API call was successful. For a failure, it will be empty. |
Content data objects
|
Element |
Type |
M/O/CM |
Description |
|---|---|---|---|
|
id |
UUID |
M |
Product ID Developer Note: Select {“planType”:”ACCOUNT_PRODUCT”} only. |
|
name |
String |
M |
Product name |
|
description |
String |
O |
Product description |
|
cost |
Decimal |
M |
Cost of the product. May contain a decimal value. If no cost is applied, the value presented would be zero. |
|
currency |
String |
M |
Cost currency, e.g., USD, GBP, EUR |
|
creationTime |
DateTime |
M |
Product creation timestamp |
|
renewalInterval |
String |
M |
Renewal period interval. ENUM valid values: DAILY, WEEKLY, MONTHLY, QUARTERLY, SEMI_ANNUALLY, ANNUALLY, ONE_TIME |
|
renewalIntervalMethod |
String |
CM |
Renewal day settings. FIRST_DAY – Renewal day is the first day of the renewal interval. E.g., 1’st of the month per ‘MONTHLY’ interval. SELF_DEFINED – Renewal day is the day defined by the user. E.g., 10’th of the month per ‘MONTHLY’ interval. PRODUCT_ALLOCATION – Renewal day is set based on the actual product allocation (attachment) day. Empty for ONE_TIME renewal interval. |
|
renewalIntervalDay |
Numeric |
CM |
Chosen renewal day of the selected period. Valid values per ENUM: DAILY: N/A WEEKLY: 1–7 MONTHLY: 1–28 QUARTERLY: 1–90 SEMI_ANNUALLY: 1–180 ANNUALLY: 1–365 ONE_TIME: N/A Populated only if SELF_DEFINED or FIRST_DAY was set per ‘renewalIntervalMethod’ attribute. |
|
expirationType |
String |
O |
Expiration date settings. ENUM valid values: FIXED – Fixed predefined expiration date. RELATIVE_ATTACHED – Time duration starting the time the product was attached to the child customer. E.g., 10 days from product attachment to the child customer. Product has no expiration if it is null. |
|
expirationDate |
Date |
CM |
Date settings per chosen ‘expirationType’. Populated only if selected ‘expirationType’ is FIXED. Empty for other expiration types or no expiration type. |
|
expirationUnit |
String |
CM |
Time unit settings for expiration calculation. ENUM Valid values: DAY, WEEK, MONTH, YEAR Empty if selected ‘expirationType’ is FIXED or no expiration type. |
|
expirationValue |
Numeric |
CM |
Time value settings per chosen ‘expirationUnit’. Empty if selected ‘expirationType’ is FIXED or no expiration type. |
Pageable data objects
|
Element |
Type |
M/O/CM |
Description |
|---|---|---|---|
|
page |
Numeric |
M |
Page number |
|
size |
Numeric |
M |
Page size. Number of requested elements per page |
|
totalPages |
Numeric |
M |
Total amount of available pages per requested page size |
|
totalElements |
Numeric |
M |
Total amount of retrieved elements |
Error Codes
In addition to the general success and failure codes, the following error codes are possible.
|
Code |
Message |
|---|---|
|
GLOBAL_1001 |
Service unavailable. Please try again |
|
CUSTOMER_1002 |
Customer does not exist |
|
CUSTOMER_1006 |
Failed to retrieve customer details |
Examples
Request Body
{
}
Response Body: Success ACK
{
"errorCode": "",
"errorMessage": "",
"content": [
{
"id": "e7fcef24-5c03-41dd-9e33-995b7d6f47a7",
"name": "VPN",
"description": "VPN product description",
"cost": 20.5,
"currency": "USD",
"creationTime": "2020-07-01T00:00:00.977Z",
"renewalInterval": "MONTHLY",
"renewalIntervalMethod": "FIRST_DAY",
"renewalIntervalDay": "",
"expirationType": "FIXED",
"expirationDate": "13092023",
"expirationUnit": "",
"expirationValue": ""
},
{
"id": "ff74dca6-8e7f-4b85-a42b-13860913b370",
"name": "APN",
"description": "APN product description",
"cost": 10.5,
"currency": "USD",
"creationTime": "2020-07-01T00:00:00.977Z",
"renewalInterval": "MONTHLY",
"renewalIntervalMethod": "SELF_DEFINED",
"renewalIntervalDay": "10",
"expirationType": "RELATIVE_ATTACHED",
"expirationDate": "",
"expirationUnit": "WEEK",
"expirationValue": "4"
}
],
"pageable": {
"page": 1,
"size": 10,
"totalPages": 1,
"totalElements": 2
}
}
Response Body: Failure NAK
{
"errorCode": "GLOBAL_1001",
"errorMessage": "Service unavailable. Please try again",
"content": "",
"pageable": ""
}